/******************************************************************************
* 	Copyright (c) 2007-2008 All rights reserved
*		Asemantics S.r.l
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer. 
*
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in
*    the documentation and/or other materials provided with the
*    distribution.
*
* 3. The end-user documentation included with the redistribution,
*    if any, must include the following acknowledgment:
*       "This product includes software developed by 
*	 Asemantics S.r.l."
*    Alternately, this acknowledgment may appear in the software itself,
*    if and wherever such third-party acknowledgments normally appear.
*
* 4. All advertising materials mentioning features or use of this software
*    must display the following acknowledgement:
*    This product includes software developed by Asemantics S.r.l.
*    the Semantic Web company, Rome, London, Leiden and its contributors. 
*
* 5. Neither the name of the company nor the names of its contributors
*    may be used to endorse or promote products derived from this software
*    without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Author: Andrea Marchesini - baku@asemantics.com
*
******************************************************************************/

#ifndef _TB_CONFIGURE_H_
#define _TB_CONFIGURE_H_

#include <controller.h>

#ifndef TB_CONTROLLER_CONFIG_FILE
#  define TB_CONTROLLER_CONFIG_FILE	"/etc/controller.cfg"
#endif

#define TB_CONTROLLER_ROOT_TAG		"Controller"
#define TB_CONTROLLER_GENERAL_TAG	"General"
#define TB_CONTROLLER_STANDALONE_TAG	"StandAlone"
#define TB_CONTROLLER_LOGFILE_TAG	"LogFile"
#define TB_CONTROLLER_LOGVERBOSE_TAG	"LogVerbose"
#define TB_CONTROLLER_SWAPDIR_TAG	"SwapDirectory"
#define TB_CONTROLLER_SWAP_SIZE_ATTR	"size"
#define TB_CONTROLLER_SWAP_FSIZE_ATTR	"fileSize"
#define TB_CONTROLLER_PIDFILE_TAG	"PidFile"
#define TB_CONTROLLER_WAITMAXISTANCE_TAG "WaitMaxIstance"
#define TB_CONTROLLER_BACKGROUND_TAG	"Background"
#define TB_CONTROLLER_USER_TAG		"User"
#define TB_CONTROLLER_GROUP_TAG		"Group"
#define TB_CONTROLLER_ENV_TAG		"Variables"
#define TB_CONTROLLER_ENV_SINGLE_TAG	"Variable"
#define TB_CONTROLLER_ENV_NAME_ATTR	"name"

#define TB_CONTROLLER_PROCESSES_TAG	"Processes"
#define TB_CONTROLLER_PROCESS_TAG	"Process"
#define TB_CONTROLLER_METAPROCESS_TAG	"MetaProcess"
#define TB_CONTROLLER_COMMAND_TAG	"Command"
#define TB_CONTROLLER_COMMAND_INLINE_ATTR "inline"
#define TB_CONTROLLER_INPUT_TAG		"Input"
#define TB_CONTROLLER_INPUT_TRIM_ATTR	"trim"
#define TB_CONTROLLER_INPUT_FP_ATTR	"fromParent"
#define TB_CONTROLLER_SCHEDULED_TAG	"Scheduled"

#define TB_CONTROLLER_NETWORK_TAG	"Network"
#define TB_CONTROLLER_NET_ACTIVE_ATTR	"active"
#define TB_CONTROLLER_NET_INTERFACE_TAG	"Interface"
#define TB_CONTROLLER_NET_PORT_TAG	"Port"
#define TB_CONTROLLER_NET_LISTEN_TAG	"Listen"
#define TB_CONTROLLER_NET_MAXCLIENTS_TAG "MaxClients"
#define TB_CONTROLLER_NET_TIMEOUT_TAG	"Timeout"
#define TB_CONTROLLER_NET_IPV6_TAG	"Ipv6"

#define TB_CONTROLLER_ID_ATTR		"id"
#define TB_CONTROLLER_HIDDEN_ATTR	"hidden"
#define TB_CONTROLLER_MULTIPLE_ATTR	"multiple"
#define TB_CONTROLLER_ISTANCE_ATTR	"istance"
#define TB_CONTROLLER_ORDER_ATTR	"order"
#define TB_CONTROLLER_TIME_ATTR		"time"
#define TB_CONTROLLER_WFI_ATTR		"wfi"

TBGlobal *	configure_init	(int		argc,
				 char **	argv,
				 GError **	error);

void		configure_free	(TBGlobal *	data);

#endif

/* EOF */
